<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<%@ page contentType="text/html; charset=utf-8"%>
	<%@ include file="/commons/taglibs.jsp"%>
	<head>
		<%@ include file="/commons/css_js_head.jsp"%>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
		<title>修改角色</title>
		<script type="text/javascript">
//复写Url
doUpdateUrl = "${ctx }/permission/efRoleAction!doUpdate.ts";
doReturnUrl = "${ctx }/permission/efRoleAction!doList.ts";

//更新
function doUpdate() {
	var _form = document.forms[0];
	if (doUpdateUrl == '') {
		alert('请设置正确的URL!');
		return false;
	}

	_form.action = doUpdateUrl;
}

//校验数据
$(document).ready(function(){
	
	$.formValidator.initConfig({formid:"form1",alertmessage:true,onerror:function(msg){alert(msg)},onsuccess:function(){doUpdate();}});
	
	$("#efRole_roleName").formValidator().inputValidator({min:1,max:16,onerror:"请输入角色名称，且只能在1-16个汉字之间"});
	$("#efRole_roleCode").formValidator().inputValidator({min:1,max:32,onerror:"请输入角色编码，且只能在1-32个字符之间"});

});

</script>
	</head>
	<body style="overflow-x: hidden">
		<div class="mTitle">
			<span class="hidsearch"></span>
			<b class="bbig">修改角色</b>
			带<b class="fred"> * </b>号为必填项
		</div>

			<!--list -->
			<div class="mainList">
				<s:form action="/easyframe/permission/efRoleAction" id="form1" method="post">
				<table class="addTable">

					<tr>
						<th width="5%">
							<b class="fred">*</b>角色名称：
						</th>
						<td width="40%">
							<s:textfield id="efRole_roleName" name="efRole.roleName" theme="simple"></s:textfield>
						</td>

					</tr>
					
					<tr>
						<th width="5%">
							<b class="fred">*</b>角色编码：
						</th>
						<td width="40%">
							<s:textfield id="efRole_roleCode" name="efRole.roleCode" theme="simple"></s:textfield>
						</td>
					</tr>

					<tr>
						<th width="5%">
							<b class="fred">*</b>是否有效：
						</th>
						<td width="40%">
							<select name="efRole.dicRoleIsValid">
								<ef:option groupname="DicRoleIsValid"
									selectedValue="${efRole.dicRoleIsValid}" link="true"></ef:option>
							</select>
						</td>

					</tr>

					<s:hidden name="efRole.roleId"></s:hidden>
				</table>


			</div>
			<div class="addToolbar">
				<p>
					<input class="btn" name="btn_confirm" value="确定" type="submit"/>
					<input class="btn" name="btn_return" value="返回" type="button"
						onclick="doReturn();" ; />
				</p>
			</div>
		</s:form>

	</body>
</html>
